package api

import (
	"github.com/astaxie/beego"
)

type UserController struct {
	beego.Controller
}

type JsonData struct {
	Token  string `json:"Token"`
	Flag   bool   `json:Flag`
	Userid int    `json:Userid`
}

func (l *UserController) Index() {

	urlname := l.Ctx.Input.Param(":urlname")

	//_username, _userpass := l.GetString("username"), l.GetString("userpass")

	result := JsonData{Token: urlname, Flag: true, Userid: 0}
	l.Data["json"] = result
	l.ServeJson()

	l.Data["Project"] = "MagiciTerm"
	l.Data["Author"] = "Thonatos.Yang"
	//l.TplNames = "index.tpl"
}
